While unlikely, a failure while writing to this file could result in dangling file handles. Python deals with this well enough, but explicitly managing the file's context is best-practice and can help you here:

```python
with open('/var/www/miq/vmdb/log/miq_last_backup_file_name', 'w') as f:
    f.write('/opt/rh/postgresql92/root/var/lib/pgsql/' + BACKUP_FILE)
```