Added error reporting to compilation