Duplicate entry/Contraint violation 1062 in file_managed on browser crash
Check whether the file is being used by another part of the system with the file_usage_list()

$file = file_load($fid);
$usage = file_usage_list($file);