directory creation error fixed; two subroutines added; deprecated fileIO syntax changed