add error message for file open fail