Make the behaviour for passing hash/filename consistent