Add debug logging to open command