edited the system logging and shell script to make it cleaner