Error reporting and file get contents