fixed fileofN_check