Recovery of not well-completed files

It is probable not the cleanest solution of problem but it has fixed my issue