Improve error messages in FileHelper