hooks: do not return None when the file is empty

Fixing a bug here, other there...