fixed callback error handling
updated version, removed microtime dependency