Added a logging function to do logging. Commented out file deletion in server.