Add error logging for file open failures