Prevent some buttons to be pressed when file is not loaded.