Added check for regular file.