added a logging function for bash