Added mcrypt configuration, added file exists checks