updated check_folder/check_filefolder functions