Big fixes and error log updates to include line numbers and file info