fixed comment parsing error, improved error handling/logging in miner