Currently ps_to_file will segfault if it does not have write permission on the file specified or if that directory does not exist.
Currently ps_to_file will segfault if it does not have write permission on the file specified or if that directory does not exist.