Fix file deletion with ctrl-d