Fixed an issue where the filename gets truncated when there is a slash in the name.