Prevent double file close
Allow cancelling file selection