Better error handling

handle invalid project files etc