error handling for file_get_contents