checked for directory output file when encrypting a file