Removed file-only mode and fixed an error in the regex