Changed splitlines() to split('\n') to avoid errors on some Windows file names that use special characters