Error check file open rights