refactored rpimon to include logging
fixed dir creation