refactored logPush and added check against tmp directory