Modularize compilation
Improve error messages for file operations