Fixed default log level if not specified by the user
Added option to return a file
Added Boolean for sorted
Added random names for tmp files
Changed to use forks