fixed pimatic startup test not waiting for writing config file
fixed callback passed to sync method