Updated listFileNameInDirectory so it wouldn't fail if directory didn't exist