cleaned up printfs inside sys_open lock