Return error from opening a file.