Refactored log.bash. Added a test file