Fixing error with file concatenation