close automatically unlocks the file

Signed-off-by: Sven Nierlein <sven@nierlein.de>
use cores close unless we have to ensure permissions

Signed-off-by: Sven Nierlein <sven@nierlein.de>