allow the user to specify file mode.