catch any errors with resizing.
Added command line option to Daemonize.