Using sleep_ms rather than usleep
Added makepath function to support
Removed unused topN value from upstart script
Removed return on logfile creation in init script that was causing service not to start