Remove debug prints and make sure tmp file created in open wrapper has read permission for user
general cleanup