make sure file mode have regular file flag