Add parameter detection (both non-optional and optional). Implement
copying file funciton except the overwrite control.