catching file permission errors