.open file is being added to user's home directory in order to prevent rmt execution for the same file if it's already opened. Added 'exists' function for validating files and directories.